open Castling;;

module CharPG = ParserGenerator (CharToken);;
open CharPG;;

let rec test = lazy !! (
	expr >> element ';' >> element 'E'
) and term = lazy !! (
	one_of ~name:"expr" [
		"call", term >> element '(' >> expr >> element ')';
		"term", element '1']
) and expr = lazy !! (
	one_of ~name:"expr" [
		"mul", expr >> element '*' >> term;
		"", term]
);;

debug := true;;
runtime_debug := true;;
generate test;;
